<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<%@ page import="java.util.Calendar"%>
<script language="JavaScript" src="<%= request.getContextPath() + "/js/calendar6.js" %>"></script>

<logic:messagesPresent message="true"> 
 <table title="Mensajes de aplicacion" align="center" >
  <tr>
    <td><html:messages id="msg" property="msgInfor" message="true">
      <table border="0" cellpadding="0" cellspacing="0">
       <tr>
         <td bgcolor="#A8BDDD" class="titalert"></td>
         <td bgcolor="#A8BDDD" class="titalert" height="30"><bean:write name="msg"/></td>
       </tr>
      </table></html:messages> 
    </td>
  </tr>
 </table>
 
  <table title="Mensajes de aplicacion" align="center" >
  <tr>
    <td><html:messages id="msg" property="msgError" message="true">
      <table border="0" cellpadding="0" cellspacing="0">
       <tr>
         <td bgcolor="#A8BDDD" class="titalert"></td>
         <td bgcolor="#A8BDDD" class="titalert" height="30"><bean:write name="msg"/></td>
       </tr>
      </table></html:messages> 
    </td>
  </tr>
 </table>
 
 <table title="Mensajes de aplicacion" align="center" >
  <tr>
    <td><html:messages id="msg" property="msgWarn" message="true">
      <table border="0" cellpadding="0" cellspacing="0">
       <tr>
         <td bgcolor="#A8BDDD" class="titalert"></td>
         <td bgcolor="#A8BDDD" class="titalert" height="30"><bean:write name="msg"/></td>
       </tr>
      </table></html:messages> 
    </td>
  </tr>
 </table>
 
 <table title="Mensajes de aplicacion" align="center" >
  <tr>
    <td><html:messages id="msg" property="msgOk" message="true">
      <table border="0" cellpadding="0" cellspacing="0">
       <tr>
         <td bgcolor="#A8BDDD" class="titalert"></td>
         <td bgcolor="#A8BDDD" class="titalert" height="30"><bean:write name="msg"/></td>
       </tr>
      </table></html:messages> 
    </td>
  </tr>
 </table>
</logic:messagesPresent> 
 
 
<table width="100%"  border="0" cellspacing="0" cellpadding="0" widtd="100%">
   
  <tr align="left"> 
   <td height="25" colspan="12" align="center" class="titulosenblanco"> 
    <p>
     <STRONG>Actualizacion de la Informacion de la Aplicacion </STRONG>
    </p>
    <p>&nbsp; </p>
   </td>
   </tr>
  <!--BOTON DE CREAR NUEVO REGISTRO  -->
  <tr align="left"> 
    <td height="25" colspan="12" class="titulosenblanco">
      <table width="99%" border="0" cellpadding="0" cellspacing="0">
        <tr> 
          <td align="right">
            <html:link paramId="code" paramName="applicationSelected" paramProperty="code" page="/admin/findApplicationUser.do">
              <img src="<%= request.getContextPath() + "/images/b_nuevo.gif" %>" alt="Nuevo" width="22" height="22" border="0">
              <br>
              <span class="celdaayd">Usuarios por Aplicacion</span>
            </html:link>
          </td>
        </tr>
        <tr> 
          <td>&nbsp;</td>
        </tr>  
      </table>
    </td>		
  </tr>

 <html:form  action="/admin/updateApplication.do"   method="post" name="frmCreateApplication" type="co.gov.medellin.ssti.sub.paoyer.administration.web.form.ApplicationForm">
  <input type="hidden" name="code" value='<bean:write name="applicationSelected" property="code" />' />
  <tr align="left">
   <td height="25" colspan="12" class="titulosenblanco">   
		<table width="100%" border="0" cellspacing="3" cellpadding="3" class="titulosenrojo">
     <tr>
    	<td width="28%">&nbsp;</td>
			<td width="23%" class="celdatabla"><strong>Nombre</strong> (*)&nbsp;&nbsp; 
			</td>
			<td width="46%"> 
              <input type="text" size= "40" class="form"  name="name" value='<bean:write name="applicationSelected" property="name" />' />
           </td>
			<td width="3%">&nbsp;</td>
     </tr>
     <tr>
		  <td width="28%">&nbsp;</td>
		  <td class="celdatabla" width="23%"><strong>Sigla</strong> (*)&nbsp;&nbsp; 
		  </td>
		  <td width="46%"> <input type="text" size= "40" class="form" value='<bean:write name="applicationSelected" property="abbreviation" />'  name="abbreviation"/></td>
		  <td width="3%">&nbsp;</td>
		 </tr>
     <tr>
		  <td width="28%">&nbsp;</td>
		  <td class="celdatabla" width="23%"><strong>Dueno Aplicacion</strong> (*)&nbsp;&nbsp; 
		  </td>
		  <td width="46%"> <html:select styleClass="form" property="ownerUserCode" style="width:215" > 
            <option value = '<bean:write name="applicationSelected" property="ownerUserCode" />' ><bean:write name="applicationSelected" property="ownerName" /></option>
            <html:options collection="owners" property="code" labelProperty="name" /> 
            </html:select></td>
		  <td width="3%">&nbsp;</td>
     </tr>
	 <tr>
		  <td width="28%">&nbsp;</td>
		  <td class="celdatabla" width="23%"><strong>Responsable</strong> (*)&nbsp;&nbsp; 
		  </td>
		  <td width="46%"> <html:select styleClass="form" property="userCode" style="width:215" > 
             <option value = '<bean:write name="applicationSelected" property="userCode" />' ><bean:write name="applicationSelected" property="inChargeName" /></option>
						<html:options collection="owners" property="code" labelProperty="name" /> 
            </html:select></td>
		  <td width="3%">&nbsp;</td>
     </tr>
	 
	<tr>
		  <td width="28%">&nbsp;</td>
		  <td class="celdatabla" width="23%"><strong>Vigencia</strong> (*)&nbsp;&nbsp; 
          </td>
		  <td width="46%">
		    <html:select styleClass="form" property="use" style="width:215" > 
             <logic:equal name="applicationSelected" property="use" value="s">           
           		 <html:option value = "s" >si</html:option>
				       <html:option value = "n" >no</html:option>
             </logic:equal>		
						 <logic:notEqual name="applicationSelected" property="use" value="s">           
							 <html:option value = "n" >no</html:option>
           		 <html:option value = "s" >si</html:option>				       
             </logic:notEqual>
            </html:select>
		  </td>
		  <td width="3%">&nbsp;</td>
     </tr>
	 <tr>
		  <td width="28%">&nbsp;</td>
		  <td class="celdatabla" width="23%"><strong>Desde</strong> (*)&nbsp;&nbsp; 
		  </td>
		  <td width="46%">
		  	 <input type="text" size= "40" class="form"  name="effectiveFrom" readonly="true"  value="<bean:write name="applicationSelected" property="effectiveFrom" />" />
			 <a href="javascript:effectiveFrom1.popup();">
                        <img src="<%= request.getContextPath() + "/images/cal.gif" %>" 
                        width="16" height="16" border="0" alt="Click para seleccionar la fecha"></a>
		  </td>
		  <td width="3%">&nbsp;</td>
	</tr>
	<tr>
		  <td width="28%">&nbsp;</td>
		  <td class="celdatabla" width="23%"><strong>Hasta</strong> (*)&nbsp;&nbsp; 
		  </td>
		  <td width="46%"> 
		  	<input type="text" size= "40" class="form" readonly="true"   name="effectiveUntil" value="<bean:write name="applicationSelected" property="effectiveUntil" />" />
			<a href="javascript:effectiveUntil1.popup();">
                        <img src="<%= request.getContextPath() + "/images/cal.gif" %>" 
                        width="16" height="16" border="0" alt="Click para seleccionar la fecha"></a>
	      </td>
		  <td width="3%">&nbsp;</td>
	</tr>
     <tr>
		  <td width="28%">&nbsp;</td>
		  <td width="23%" valign="top" class="celdatabla"><strong>Descripcion</strong> 
            (*)&nbsp;&nbsp; </td>
		  <td width="46%"> <textarea  name="description" cols="35" rows="5" class="form"><bean:write name="applicationSelected" property="description" /></textarea></td>
		  <td width="3%">&nbsp;</td>
	</tr>
		  <tr> 
			<td class="celdatabla" colspan="3" align="center">&nbsp;Los campos marcados con (*) son obligatorios</td>
			<td width="3%">&nbsp;</td>
		  </tr>
		  <tr> 
			<td colspan="4">&nbsp;</td>
		  </tr>
		  <tr> 
			<td colspan="4" align="center"><html:image src='<%= request.getContextPath() + "/images/b_ingresar_b1.gif" %>' border="0" value='Guardar' title='Guardar' onclick='submit;' /></td>
		  </tr>
	   </table>
    </td>
  </tr>  
 </html:form>  
</table>

<script language="JavaScript">
                       
                        var effectiveFrom1 = new calendar1(document.forms['frmCreateApplication'].elements['effectiveFrom'],"-",'<%=request.getContextPath()+"/js/"%>');
                        var effectiveUntil1 = new calendar1(document.forms['frmCreateApplication'].elements['effectiveUntil'],"-",'<%=request.getContextPath()+"/js/"%>');
                      
                      </script>
<p>&nbsp;</p>
<table width="100%"  border="0" cellspacing="0" cellpadding="0">
  <tr>
     <td width="20" scope="col">&nbsp;</td>
     <td width="33" align="left" scope="col"><div align="center"><html:link page="/admin/manageApplications.do"><img src="<%= request.getContextPath() + "/images/b_atras.gif" %>" width="24" height="15" border="0"><br>
     <span class="celdaayd">Atras</span></html:link></div></td>
	 
     <td align="right" scope="col">&nbsp;</td>
     <td width="20" scope="col">&nbsp;</td>
  </tr>
</table>
